using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LinearReferencingTools
{
    /// <summary>
    /// <para>Transform Route Events</para>
    /// <para>Transforms the measures of events from one route reference to another and writes them to a new event table.</para>
    /// <para>将事件的度量从一个路由引用转换为另一个路由引用，并将其写入新的事件表。</para>
    /// </summary>    
    [DisplayName("Transform Route Events")]
    public class TransformRouteEvents : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TransformRouteEvents()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Event Table</para>
        /// <para>The input event table.</para>
        /// <para>输入事件表。</para>
        /// </param>
        /// <param name="_in_event_properties">
        /// <para>Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events in the input event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events in the input event table (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和输入事件表中的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。此字段可以是数字或字符。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输入事件表中的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定 from-measure 字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。此字段必须为数值，并且在事件类型为 POINT 或 LINE 时为必填字段。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 包含测量值的字段。此字段必须为数值，当事件类型为 LINE 时为必填字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_routes">
        /// <para>Source Route Features</para>
        /// <para>The input route features.</para>
        /// <para>输入路由功能。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Source Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each input route.</para>
        /// <para>包含唯一标识每个输入路由的值的字段。</para>
        /// </param>
        /// <param name="_target_routes">
        /// <para>Target Route Features</para>
        /// <para>The route features to which the input events will be transformed.</para>
        /// <para>输入事件将转换为的路径要素。</para>
        /// </param>
        /// <param name="_target_route_id_field">
        /// <para>Target Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each target route.</para>
        /// <para>包含唯一标识每个目标路由的值的字段。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Event Table</para>
        /// <para>The table to be created.</para>
        /// <para>要创建的表。</para>
        /// </param>
        /// <param name="_out_event_properties">
        /// <para>Output Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events that will be written to the output event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field that will contain values that indicate the route on which each event is located.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events the output event table will contain (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a single measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field that will contain measure values. Required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field that will contain measure values. Required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和将写入输出事件表的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输出事件表将包含的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定一个度量字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。当事件类型为 POINT 或 LINE 时为必填项。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 将包含测量值的字段。当事件类型为LINE时为必填项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_cluster_tolerance">
        /// <para>Cluster Tolerance</para>
        /// <para>The maximum tolerated distance between the input events and the target routes.</para>
        /// <para>输入事件与目标路由之间的最大容许距离。</para>
        /// </param>
        public TransformRouteEvents(object _in_table, object _in_event_properties, object _in_routes, object _route_id_field, object _target_routes, object _target_route_id_field, object _out_table, object _out_event_properties, string _cluster_tolerance)
        {
            this._in_table = _in_table;
            this._in_event_properties = _in_event_properties;
            this._in_routes = _in_routes;
            this._route_id_field = _route_id_field;
            this._target_routes = _target_routes;
            this._target_route_id_field = _target_route_id_field;
            this._out_table = _out_table;
            this._out_event_properties = _out_event_properties;
            this._cluster_tolerance = _cluster_tolerance;
        }
        public override string ToolboxName => "Linear Referencing Tools";

        public override string ToolName => "Transform Route Events";

        public override string CallName => "lr.TransformRouteEvents";

        public override List<string> AcceptEnvironments => ["configKeyword", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_table, _in_event_properties, _in_routes, _route_id_field, _target_routes, _target_route_id_field, _out_table, _out_event_properties, _cluster_tolerance, _in_fields.GetGPValue()];

        /// <summary>
        /// <para>Input Event Table</para>
        /// <para>The input event table.</para>
        /// <para>输入事件表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Event Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events in the input event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events in the input event table (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和输入事件表中的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。此字段可以是数字或字符。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输入事件表中的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定 from-measure 字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。此字段必须为数值，并且在事件类型为 POINT 或 LINE 时为必填字段。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 包含测量值的字段。此字段必须为数值，当事件类型为 LINE 时为必填字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Table Properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_event_properties { get; set; }


        /// <summary>
        /// <para>Source Route Features</para>
        /// <para>The input route features.</para>
        /// <para>输入路由功能。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Route Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_routes { get; set; }


        /// <summary>
        /// <para>Source Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each input route.</para>
        /// <para>包含唯一标识每个输入路由的值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Route Identifier Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>Target Route Features</para>
        /// <para>The route features to which the input events will be transformed.</para>
        /// <para>输入事件将转换为的路径要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Route Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_routes { get; set; }


        /// <summary>
        /// <para>Target Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each target route.</para>
        /// <para>包含唯一标识每个目标路由的值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Route Identifier Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_route_id_field { get; set; }


        /// <summary>
        /// <para>Output Event Table</para>
        /// <para>The table to be created.</para>
        /// <para>要创建的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Event Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Output Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events that will be written to the output event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field that will contain values that indicate the route on which each event is located.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events the output event table will contain (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a single measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field that will contain measure values. Required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field that will contain measure values. Required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和将写入输出事件表的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输出事件表将包含的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定一个度量字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。当事件类型为 POINT 或 LINE 时为必填项。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 将包含测量值的字段。当事件类型为LINE时为必填项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Event Table Properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_event_properties { get; set; }


        /// <summary>
        /// <para>Cluster Tolerance</para>
        /// <para>The maximum tolerated distance between the input events and the target routes.</para>
        /// <para>输入事件与目标路由之间的最大容许距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cluster Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string _cluster_tolerance { get; set; }


        /// <summary>
        /// <para>Include all fields from input</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output event table will contain route location fields plus all the attributes from the input events.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output event table will contain route location fields plus all the attributes from the input events. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output event table will only contain route location fields plus the ObjectID field from the input events.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出事件表是否包含路径位置字段以及输入事件中的所有属性。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 输出事件表将包含路径位置字段以及输入事件中的所有属性。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 输出事件表将仅包含路径位置字段以及输入事件中的 ObjectID 字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include all fields from input")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _in_fields_value _in_fields { get; set; } = _in_fields_value._true;

        public enum _in_fields_value
        {
            /// <summary>
            /// <para>FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FIELDS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_FIELDS")]
            [GPEnumValue("false")]
            _false,

        }

        public TransformRouteEvents SetEnv(object configKeyword = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}